From c07033401fe8a14f3f1832053297208dc918409b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 21 Feb 2004 13:28:03 +0000 Subject: [PATCH] (animate-birthday-present): Accept other than `Sarah', too. --- lisp/play/animate.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/play/animate.el b/lisp/play/animate.el index 40c4696dc08..23e7939f47a 100644 --- a/lisp/play/animate.el +++ b/lisp/play/animate.el @@ -151,11 +151,13 @@ Strings will be separated from each other by SPACE lines." (setq list-of-strings (cdr list-of-strings))))) ;;;###autoload -(defun animate-birthday-present () - "Display Sarah's birthday present in a new buffer." - (interactive) +(defun animate-birthday-present (&optional name) + "Display one's birthday present in a new buffer. +You can specify the one's name by NAME; the default value is \"Sarah\"." + (interactive (list (read-string "Name (default \"Sarah\"): " + nil nil "Sarah"))) ;; Make a suitable buffer to display the birthday present in. - (switch-to-buffer (get-buffer-create "*Sarah*")) + (switch-to-buffer (get-buffer-create (format "*%s*" name))) (erase-buffer) ;; Display the empty buffer. (sit-for 0) @@ -164,7 +166,7 @@ Strings will be separated from each other by SPACE lines." (setq indent-tabs-mode nil) (animate-string "Happy Birthday," 6) - (animate-string "Sarah" 7) + (animate-string (format "%s" name) 7) (sit-for 1) -- 2.30.2